import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Tournament implements Runnable {
	long[][] comb;
	long[] sfact;
	long[] fact;

    private void solve() {
		int n = nextInt();
		long[] l = new long[n];
		long[] odd = new long[n / 2];
		long[] even = new long[n / 2];
		for (int i = 0; i < n; ++i) {
			l[i] = nextInt();
			if (i % 2 == 0) even[i / 2] = l[i]; else odd[i / 2] = l[i];
		}
		if (getBest(l) != getBest(odd) + getBest(even)) {
			writer.println("NO");
			return;
		}
		fillComb(n);
		fillSfact(n);
		fillFact(n);
		long middle;
		{
			long[] tmp = l.clone();
			Arrays.sort(tmp);
			middle = tmp[l.length / 2];
		}
		long k = nextLong();
		int[] res = new int[n];
		Arrays.fill(res, -1);
		int[] numSet = new int[2];
		for (int i = 0; i < n; ++i) if (res[i] < 0) {
			++numSet[i % 2];
			boolean ok = false;
			for (int j = 0; j < n; ++j) {
				if (i % 2 == j % 2 && res[j] < 0) {
					if (l[i] > middle && l[j] > middle)
						continue;
					if (l[i] < middle && l[j] < middle)
						continue;
					res[i] = j;
					res[j] = i;
					long curAmount = getTotalAmount(l, res, middle, numSet);
					if (curAmount >= k) {
						ok = true;
						break;
					}
					k -= curAmount;
					res[i] = -1;
					res[j] = -1;
				}
			}
			if (!ok) {
				writer.println("OVER");
				return;
			}
		}
		writer.println("YES");
		for (int i = 0; i < n; ++i) {
			if (i > 0) writer.print(" ");
			writer.print(res[i] + 1);
		}
		writer.println();
    }

	private void fillFact(int n) {
		fact = new long[n + 1];
		for (int i = 0; i <= n; ++i) {
			fact[i] = 1;
			for (int j = i; j > 0; j -= 1) {
				fact[i] = mult(fact[i], j);
			}
		}
	}

	private void fillSfact(int n) {
		sfact = new long[n + 1];
		for (int i = 0; i <= n; ++i) {
			sfact[i] = 1;
			for (int j = i; j > 0; j -= 2) {
				sfact[i] = mult(sfact[i], j);
			}
		}
	}

	private void fillComb(int n) {
		comb = new long[n + 1][n + 1];
		comb[0][0] = 1;
		for (int i = 1; i <= n; ++i) {
			comb[i][0] = 1;
			for (int j = 1; j <= n; ++j) {
				comb[i][j] = Math.min(INF, comb[i - 1][j - 1] + comb[i - 1][j]);
			}
		}
	}

	static final long INF = Long.MAX_VALUE / 3;

	private long getTotalAmount(long[] l, int[] res, long middle, int[] numSet) {
		int[] cnt = getCounts(l, res, middle);
		long prod = 1;
		for (int part = 0; part < 2; ++part) {
			int numLess = cnt[part * 3 + 0];
			int numEqual = cnt[part * 3 + 1];
			int numGreater = cnt[part * 3 + 2];
			int eachHalf = l.length / 4 - numSet[part];
			if (numLess > eachHalf)
				return 0;
			if (numGreater > eachHalf)
				return 0;
			int middlePart = 2 * (eachHalf - Math.max(numLess, numGreater));
			long cur = comb[numEqual][middlePart];
			if (middlePart > 0)
				cur = mult(cur, sfact[middlePart - 1]);
			cur = mult(cur, fact[Math.max(numLess, numGreater)]);
			prod = mult(prod, cur);
		}
		return prod;
	}

	private long mult(long a, long b) {
		if (a == 0 || b == 0) return 0;
		if (INF / b < a)
			return INF;
		else
			return a * b;
	}

	int[] getCounts(long[] l, int[] res, long middle) {
		int[] cnt = new int[6];
		for (int i = 0; i < l.length; ++i)
			if (res[i] < 0) {
				if (l[i] < middle)
					++cnt[(i % 2) * 3 + 0];
				else if (l[i] > middle)
					++cnt[(i % 2) * 3 + 2];
				else
					++cnt[(i % 2) * 3 + 1];
			}
		return cnt;
	}

	private long getBest(long[] l) {
		long[] tmp = l.clone();
		Arrays.sort(tmp);
		long sum = 0;
		for (int i = 0; i < l.length / 2; ++i)
			sum -= tmp[i];
		for (int i = l.length / 2; i < l.length; ++i)
			sum += tmp[i];
		return sum;
	}

	public static void main(String[] args) {
        new Tournament().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    static final String TASK_ID = "tournament";

    public void run() {
        try {
            reader = new BufferedReader(new FileReader(TASK_ID + ".in"));
            tokenizer = null;
            writer = new PrintWriter(TASK_ID + ".out");
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    int nextInt() {
        return Integer.parseInt(nextToken());
    }

    long nextLong() {
        return Long.parseLong(nextToken());
    }

    double nextDouble() {
        return Double.parseDouble(nextToken());
    }

    String nextToken() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
}
